/**
 * quaternion.js
 * 
 * Implements Quaternion class.
 * 
 * @author A.Weissflog
 * 
 * (C) 2010 A.Weissflog
 */

/**
 * Default constructor, initializes quaternion to identity.
 */
function Quaternion()
{
	this.x = 0.0;
	this.y = 0.0;
	this.z = 0.0;
	this.w = 0.0;
}

/**
 * Create new Quaternion object from values.
 * 
 * @param {Number} x_
 * @param {Number} y_
 * @param {Number} z_
 * @param {Number} w_
 */
Quaternion.FromValues = function(x_, y_, z_, w_)
{
	var v = new Quaternion();
	v.x = x_;
	v.y = y_;
	v.z = z_;
	v.w = w_;
	return v;
}

/**
 * Set component values.
 * 
 * @param {Number} x_
 * @param {Number} y_
 * @param {Number} z_
 * @param {Number} w
 */
Quaternion.prototype.Set = function(x_, y_, z_, w)
{
	this.x = _x;
	this.y = _y;
	this.z = _z;
	this.w = _w;
}

